<?php

namespace Erp\PollBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Erp\UserBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * Erp\PollBundle\Entity\Questionpoll
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Erp\PollBundle\Entity\QuestionpollRepository")
 */
class Questionpoll
{
	
	public function __construct($ques = '', $created_by = '')
	{
		$this->created_on = new \Datetime();
		$this->ques = $ques;
		$this->created_by = $created_by;
	//	$this->userpoll = $created_by;
	}
	
	/**
	 * @ORM\ManyToOne(targetEntity="Erp\UserBundle\Entity\User", inversedBy="poll")
	 * @ORM\JoinColumn(name="created_by", referencedColumnName="id")
	 *
	 */
	
	protected $userpoll;
	
	/**
	 * @ORM\OneToMany(targetEntity="Options", mappedBy="quespoll")
	 *
	 */
	
	protected $optionpoll;
	
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
	
    private $id;

    /**
     * @var string $ques
     *
     * @ORM\Column(name="ques", type="string", length=255)
     */
    private $ques;

    /**
     * @var date $created_on
     *
     * @ORM\Column(name="created_on", type="date")
     */
    private $created_on;

    /**
     * @var integer $created_by
     *
     * @ORM\Column(name="created_by", type="integer")
     */
    private $created_by;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set ques
     *
     * @param string $ques
     */
    public function setQues($ques)
    {
        $this->ques = $ques;
    }

    /**
     * Get ques
     *
     * @return string 
     */
    public function getQues()
    {
        return $this->ques;
    }

    /**
     * Set created_on
     *
     * @param date $createdOn
     */
    public function setCreatedOn($createdOn)
    {
        $this->created_on = $createdOn;
    }

    /**
     * Get created_on
     *
     * @return date 
     */
    public function getCreatedOn()
    {
        return $this->created_on;
    }

    /**
     * Set created_by
     *
     * @param integer $createdBy
     */
    public function setCreatedBy($createdBy)
    {
        $this->created_by = $createdBy;
    }

    /**
     * Get created_by
     *
     * @return integer 
     */
    public function getCreatedBy()
    {
        return $this->created_by;
    }
}